<template>
  <div id="index">
    <!-- 电脑网站 -->
    <div v-if="!isMobile">
      <PcHeader></PcHeader>

       <!-- 路由，相当于vue-router的router-view -->
      <nuxt/>

       <!-- pc网站尾部 -->
      <PcFooter></PcFooter>
    </div>

    <!-- 移动端网站 -->
    <div v-if="isMobile">

      <mobileHeader></mobileHeader>

      <nuxt/>

      <MobileFooter></MobileFooter>

    </div>

  </div>
</template>

<script>
import PcHeader from '~/components/pc/common/swellpro-header'
import PcFooter from '~/components/pc/common/swellpro-footer'
import mobileHeader from '~/components/mobile/common/swellpro-header'
import MobileFooter from '~/components/mobile/common/swellpro-footer'
export default {
    components: {
        PcHeader,
        PcFooter,
        mobileHeader,
        MobileFooter
    },
    data() {
      return {
        isMobile: this.$isMobile
      }
    }
}
</script>
<style lang='stylus' scoped>
#index
  width 100%
  height 100%
  position relative
</style>